<template>
	<view class="details">
		<view class="title">
			<text>隐患基础信息</text>
		</view>
		<view class="yhbox">
			<view class="list">
				<text class="one">隐患名称</text>
				<text class="two">{{obj.yhmc}}</text>
			</view>
			<view class="list">
				<text class="one">隐患位置</text>
				<text class="two">{{obj.dyName}}</text>
			</view>
			<view class="list">
				<text class="one">治理类型</text>
				<text class="two">{{obj.zllx == 0 ? '即查即改' : '限期整改' }}</text>
			</view>
			<view class="list">
				<text class="one">隐患类型</text>
				<text class="two">{{obj.yhlx == 1 ? '安全' : obj.yhlx == 2 ? '工艺' : obj.yhlx == 3 ? '电气': obj.yhlx == 4 ? '仪表': obj.yhlx == 5 ? '消防': obj.yhlx == 6 ? '总图': obj.yhlx == 7 ? '设备': '其他' }}</text>
			</view>
			<view class="list">
				<text class="one">隐患等级</text>
				<text class="two">{{obj.yhdj == 0 ? '一般隐患' : '重大隐患' }}</text>
			</view>
			<view class="list wu">
				<text class="one">验收时间</text>
				<text class="two">{{obj.yssj}}</text>
			</view>
		</view>
		<view class="title">
			<text>隐患描述</text>
		</view>
		<view class="yhms">
			<textarea v-model="obj.yhms" height="300"  disabled disabledColor='#F6F6F6'
				style="background:#fff;margin-bottom: 30px;width: 100%!important;border-radius: 16rpx;padding: 24px;box-sizing: border-box;"></textarea>
		</view>
		<view class="title">
			<text>原因分析</text>
		</view>
		<view class="fxyy">
			<textarea v-model="obj.yyfx" height="300"  disabled disabledColor='#F6F6F6'
				style="background:#fff;margin-bottom: 30px;width: 100%!important;border-radius: 16rpx;padding: 24px;box-sizing: border-box;"></textarea>
		</view>
		<view class="title">
			<text>管控措施</text>
		</view>
		<view class="fxyy">
			<textarea v-model="obj.kzcs" height="300"  disabled disabledColor='#F6F6F6'
				style="background:#fff;margin-bottom: 30px;width: 100%!important;border-radius: 16rpx;padding: 24px;box-sizing: border-box;"></textarea>
		</view>
		<!-- <view class="title">
			<text>隐患照片</text>
		</view>
		<view class="yhzp">
			<image src="../../static/operation/xj.png" mode=""></image>
		</view> -->
		<view class="title">
			<text>整改人信息</text>
		</view>
		<view class="figure">
			<view class="figure-top">
				<view class="left">
					<text>整改责任人</text>
				</view>
				<view class="right">
					<text>{{obj.zgfzr}}</text>
				</view>
			</view>
			<view class="figure-foot">
				<view class="left">
					<text>隐患治理期限</text>
				</view>
				<view class="right">
					<text>{{obj.yhzlqx}}</text>
				</view>
			</view>
		</view>
		<view class="title">
			<text>验收人信息</text>
		</view>
		<view class="figure">
			<view class="figure-top">
				<view class="left">
					<text>验收人</text>
				</view>
				<view class="right">
					<text>{{obj.ysrxm}}</text>
				</view>
			</view>
			<view class="figure-foot">
				<view class="left">
					<text>验收时间</text>
				</view>
				<view class="right">
					<text>{{obj.yssj}}</text>
				</view>
			</view>
		</view>
		<view class="title">
			<text>人物环管</text>
		</view>
		<view class="figure">
			<view class="figure-top">
				<view class="left">
					<text>人物管理分类</text>
				</view>
				<view class="right">
					<text>{{obj.rwglfl}}</text>
				</view>
			</view>
			<view class="figure-foot">
				<view class="left">
					<text>发生环节</text>
				</view>
				<view class="right">
					<text>{{obj.fshj}}</text>
				</view>
			</view>
		</view>
		<view class="title">
			<text>整改结果</text>
		</view>
		<view class="result">
			<view class="title ml">
				<text>整改结果</text>
			</view>
			<view class="zgjg">
				<textarea v-model="obj.zgjg" height="300" disabledColor='#F6F6F6' disabled
					style="background:#F6F6F6;margin-bottom: 30px;width: 100%!important;border-radius: 16rpx;padding: 24px;box-sizing: border-box;"></textarea>
			</view>
			<view class="title ml">
				<text>整改后照片</text>
			</view>
			<view style="display: flex;">
				<view class="yhzp" v-for="(item,index) in imgUrl" :key="index">
					<image  :src="item" mode=""></image>
				</view>
			</view>
		</view>
		<view class="btn">
			<view class="btn-left">
				<u-button @click="reject" text="驳回"></u-button>
			</view>
			<view class="btn-right">
				<u-button type="primary" @click="passd" text="通过"></u-button>
			</view>
		</view>
	</view>
</template>

<script>
	import { pagefxList } from '../../api/yhzl.js'
	export default {
		data() {
			return {
				imgUrl:[],
			obj:{},
			}
		},
		onLoad(obj) {
		this.obj = JSON.parse(obj.details)
		// this.getList()
		console.log(this.obj);
		this.imgUrl = this.obj.yhzgzp.split(',')
		},
		methods: {
			// getList(){
				// console.log(this.obj.dy,256);
				// pagefxList(this.queryParams).then((res) =>{
				// 	console.log(res.data.list);
				// 	let dyName = null
				// 	res.data.list.forEach(element => {
				// 	    if(this.obj.dy == element.riskEventId){
				// 			dyName = element.riskEventName
				// 		}      
				// 	});
				// 	this.dyName = dyName
				// })
			// },
			reject(){
				uni.navigateTo({
					// url:'/pages/turnDown/turnDown',
					url: `/pages/turnDown/turnDown?details=${JSON.stringify(this.obj)}`,
				})
			},
			passd(){
				uni.navigateTo({
					url: `/pages/passOpinion/passOpinion?details=${JSON.stringify(this.obj)}`,
					// url:'/pages/passOpinion/passOpinion'
				})
			}
		}
	}
</script>

<style lang="scss">
.details{
	width: 100vw;
	// height: calc(100vh - 88rpx);
	background-color: #F6F6F6;
	padding: 40rpx 24rpx 24rpx;
	box-sizing: border-box;
	.title{
		margin-left: 48rpx;
		font-size: 28rpx;
		color: #999999;
		margin-bottom: 16rpx;
	}
	.ml{
		margin-left: 0;
	}
	.yhbox{
		width: 702rpx;
		height: 650rpx;
		background-color: #fff;
		border-radius: 16rpx;
		padding: 0 48rpx;
		box-sizing: border-box;
		margin-bottom: 40rpx;
		.list{
			// width: 702rpx;
			width: 100%;
			height: 108rpx;
			line-height: 108rpx;
			border-bottom: 1rpx #eeeeee solid;
			.one{
				font-size: 28rpx;
				color: #999999;
			}
			.two{
				margin-left: 64rpx;
				font-size: 28rpx;
				color: #666666;
			}
		}
		.wu{
			border-bottom: none;
		}
	}
	.yhms{
		width: 702rpx;
		height: 300rpx;
		border-radius: 16rpx;
		margin-bottom: 40rpx;
	}
	.fxyy{
		width: 702rpx;
		height: 300rpx;
		border-radius: 16rpx;
		margin-bottom: 40rpx;
	}
	.figure{
		width: 702rpx;
		height: 216rpx;
		background-color: #fff;
		border-radius: 16rpx;
		padding: 0 48rpx;
		box-sizing: border-box;
		margin-bottom: 40rpx;
		.figure-top{
			display: flex;
			height: 108rpx;
			line-height: 108rpx;
			.left{
				width: 180rpx;
				text-align-last: left;
				font-size: 28rpx;
				color: #999999;
			}
			.right{
				margin-left: 24rpx;
				font-size: 28rpx;
				color: #666666;
			}
		}
		.figure-foot{
			display: flex;
			height: 108rpx;
			line-height: 108rpx;
			.left{
				width: 180rpx;
				text-align-last: left;
				font-size: 28rpx;
				color: #999999;
			}
			.right{
				margin-left: 24rpx;
				font-size: 28rpx;
				color: #666666;
			}
		}
	}
	.yhzp{
		width: 330rpx;
		height: 220rpx;
		background-color: #fff;
		border-radius: 8rpx;
		display: flex;
		align-items:center;
		justify-content:center;
		margin-bottom: 40rpx;
		image{
			width:100%;
			height: 100%;
			margin-right: 30rpx;
		}
	}
	.result{
		width: 702rpx;
		height: 770rpx;
		padding: 32rpx 48rpx;
		box-sizing: border-box;
		background-color: #fff;
		border-radius: 16rpx;
		.zgjg{
			width: 606rpx;
			height: 300rpx;
			margin-bottom: 64rpx;
		}
		// .uploading{
		// 	width: 220rpx;
		// 	height: 220rpx;
		// 	background-color: #F6F6F6;
		// }
	}
	.btn{
		margin-top: 40rpx;
		display: flex;
		.btn-left{
			width: 339rpx;
			height: 108rpx;
		}
		.btn-right{
			margin-left: 24rpx;
			width: 339rpx;
			height: 108rpx;
		}
	}
}
</style>
